//2009/08/11 21:46:55
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <algorithm>

using namespace std;

class NoOrderOfOperations
{
public:
    int evaluate(string expr)
    {
		int res = expr[0] - '0';
		for(int i=1; i+1<expr.size(); i+=2)
		{
			if(expr[i] == '+') res += expr[i+1] - '0';
			if(expr[i] == '-') res -= expr[i+1] - '0';
			if(expr[i] == '*') res *= expr[i+1] - '0';
		}
		return res;
    }
};
